
<div class="msg-ajax">
	<form id="frm-msg" action="<?php echo site_url('c=member&m=msg_do');?>"
		submitbefor="frm_msg_befor"
		submitafter ="frm_msg_after" 
	>
	<input type="hidden" name="to_id" value="<?php echo $id;?>"/>
	<table class="tbl-frm-1">
		<tr>
			<td>
				<textarea id="cont" class="txt1" name="cont"></textarea>
			</td>
		</tr>

		<tr>
			<td class="p1">
				<input class="btn-4 btn-ajax-submit" frmid="frm-msg" type="button" value="发&nbsp;&nbsp;送"/>
			</td>
		</tr>
	</table>
	</form>
</div>

<script>
function frm_msg_befor($frm){
	var cont = $('#cont').val().trim();
	if(cont.length<=0){
    	asyncbox.tips('内容不能为空 !','error');
    	return false;
	} 
	
	return true;	
}

function frm_msg_after(msg,$frm){
	if(msg.status == 'succ'){
    	$.close('wm-msg-send');
    	asyncbox.tips('发送成功！','success');
	}
	return false;	
}

ajaxinit();
</script>